
using System;
using System.Configuration;

namespace OF.Security.Utils
{
	public class UriConfigurationElement : NamedConfigurationElement
	{
		[ConfigurationProperty("uri")]
		private string UriString
		{
			get
			{
				return (string)base["uri"];
			}
		}

		public Uri Uri
		{
			get
			{
				Uri uri;
				if (!UriContextCache.Instance.TryGetValue(this.UriString, out uri))
				{
					uri = UriHelper.ResolveUri(this.UriString);
					UriContextCache.Instance.Add(this.UriString, uri);
				}
				return uri;
			}
		}
	}
}
